package com.kili.file.config.condition;

import com.kili.file.config.factory.LocalFileUploadFactoryBean;
import com.kili.file.config.factory.OssCloudFileUploadFactoryBean;
import com.kili.file.config.factory.S3CloudFileUploadFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Dynamically load different processors according to different parameter configurations.
 *
 * @author Gordon
 * @version 2019/3/28
 */
@Configuration
public class UploadModeConfig {

    @Bean
    public LocalFileUploadFactoryBean loadLocalStorage() {

        return new LocalFileUploadFactoryBean();
    }

    @Bean
    public OssCloudFileUploadFactoryBean loadCloudStorage() {
        return new OssCloudFileUploadFactoryBean();
    }

    @Bean
    public S3CloudFileUploadFactoryBean loadS3CloudStorage() {
        return new S3CloudFileUploadFactoryBean();
    }


}
